@@ -32,7 +32,7 @@ |
||
| 32 | 32 | |
| 33 | 33 | /** |
| 34 | 34 | * @param Key $management_key |
| 35 | - * @param $key_management_mode |
|
| 35 | + * @param string $key_management_mode |
|
| 36 | 36 | * @param ContentEncryptionAlgorithm $enc |
| 37 | 37 | * @return Key |
| 38 | 38 | * @throws \Exception |
@@ -1,16 +1,16 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Copyright 2015 OpenStack Foundation |
|
| 4 | - * Licensed under the Apache License, Version 2.0 (the "License"); |
|
| 5 | - * you may not use this file except in compliance with the License. |
|
| 6 | - * You may obtain a copy of the License at |
|
| 7 | - * http://www.apache.org/licenses/LICENSE-2.0 |
|
| 8 | - * Unless required by applicable law or agreed to in writing, software |
|
| 9 | - * distributed under the License is distributed on an "AS IS" BASIS, |
|
| 10 | - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
| 11 | - * See the License for the specific language governing permissions and |
|
| 12 | - * limitations under the License. |
|
| 13 | - **/ |
|
| 3 | + * Copyright 2015 OpenStack Foundation |
|
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
|
| 5 | + * you may not use this file except in compliance with the License. |
|
| 6 | + * You may obtain a copy of the License at |
|
| 7 | + * http://www.apache.org/licenses/LICENSE-2.0 |
|
| 8 | + * Unless required by applicable law or agreed to in writing, software |
|
| 9 | + * distributed under the License is distributed on an "AS IS" BASIS, |
|
| 10 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
| 11 | + * See the License for the specific language governing permissions and |
|
| 12 | + * limitations under the License. |
|
| 13 | + **/ |
|
| 14 | 14 | |
| 15 | 15 | namespace jwk; |
| 16 | 16 | |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | final class IVFactory { |
| 24 | 24 | |
| 25 | 25 | /** |
| 26 | - * @param $size |
|
| 26 | + * @param integer $size |
|
| 27 | 27 | * @return string |
| 28 | 28 | */ |
| 29 | 29 | static public function build($size){ |
@@ -144,7 +144,7 @@ |
||
| 144 | 144 | |
| 145 | 145 | /** |
| 146 | 146 | * @param PrivateKey $private_key |
| 147 | - * @return IAsymmetricJWK|null |
|
| 147 | + * @return RSAJWK |
|
| 148 | 148 | * @throws InvalidJWKType |
| 149 | 149 | */ |
| 150 | 150 | static public function fromPrivateKey(PrivateKey $private_key) |
@@ -1,16 +1,16 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Copyright 2015 OpenStack Foundation |
|
| 4 | - * Licensed under the Apache License, Version 2.0 (the "License"); |
|
| 5 | - * you may not use this file except in compliance with the License. |
|
| 6 | - * You may obtain a copy of the License at |
|
| 7 | - * http://www.apache.org/licenses/LICENSE-2.0 |
|
| 8 | - * Unless required by applicable law or agreed to in writing, software |
|
| 9 | - * distributed under the License is distributed on an "AS IS" BASIS, |
|
| 10 | - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
| 11 | - * See the License for the specific language governing permissions and |
|
| 12 | - * limitations under the License. |
|
| 13 | - **/ |
|
| 3 | + * Copyright 2015 OpenStack Foundation |
|
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
|
| 5 | + * you may not use this file except in compliance with the License. |
|
| 6 | + * You may obtain a copy of the License at |
|
| 7 | + * http://www.apache.org/licenses/LICENSE-2.0 |
|
| 8 | + * Unless required by applicable law or agreed to in writing, software |
|
| 9 | + * distributed under the License is distributed on an "AS IS" BASIS, |
|
| 10 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
| 11 | + * See the License for the specific language governing permissions and |
|
| 12 | + * limitations under the License. |
|
| 13 | + **/ |
|
| 14 | 14 | |
| 15 | 15 | namespace jwk; |
| 16 | 16 | |
@@ -1,16 +1,16 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Copyright 2015 OpenStack Foundation |
|
| 4 | - * Licensed under the Apache License, Version 2.0 (the "License"); |
|
| 5 | - * you may not use this file except in compliance with the License. |
|
| 6 | - * You may obtain a copy of the License at |
|
| 7 | - * http://www.apache.org/licenses/LICENSE-2.0 |
|
| 8 | - * Unless required by applicable law or agreed to in writing, software |
|
| 9 | - * distributed under the License is distributed on an "AS IS" BASIS, |
|
| 10 | - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
| 11 | - * See the License for the specific language governing permissions and |
|
| 12 | - * limitations under the License. |
|
| 13 | - **/ |
|
| 3 | + * Copyright 2015 OpenStack Foundation |
|
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
|
| 5 | + * you may not use this file except in compliance with the License. |
|
| 6 | + * You may obtain a copy of the License at |
|
| 7 | + * http://www.apache.org/licenses/LICENSE-2.0 |
|
| 8 | + * Unless required by applicable law or agreed to in writing, software |
|
| 9 | + * distributed under the License is distributed on an "AS IS" BASIS, |
|
| 10 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
| 11 | + * See the License for the specific language governing permissions and |
|
| 12 | + * limitations under the License. |
|
| 13 | + **/ |
|
| 14 | 14 | |
| 15 | 15 | namespace jwa\cryptographic_algorithms\content_encryption\AES_CBC_HS; |
| 16 | 16 | |
@@ -90,10 +90,10 @@ discard block |
||
| 90 | 90 | // MAC_KEY = initial MAC_KEY_LEN octets of K |
| 91 | 91 | $mac_key = substr($key, 0, $mac_key_len); |
| 92 | 92 | /** |
| 93 | - * The octet string AL is equal to the number of bits in the |
|
| 94 | - * Additional Authenticated Data ($aad) expressed as a 64-bit unsigned |
|
| 95 | - * big-endian integer |
|
| 96 | - */ |
|
| 93 | + * The octet string AL is equal to the number of bits in the |
|
| 94 | + * Additional Authenticated Data ($aad) expressed as a 64-bit unsigned |
|
| 95 | + * big-endian integer |
|
| 96 | + */ |
|
| 97 | 97 | $al = ByteUtil::convert2UnsignedLongBE(strlen($aad) * 8); |
| 98 | 98 | // M = MAC(MAC_KEY, A || IV || E || AL) |
| 99 | 99 | $secured_input = implode('', array( |
@@ -1,16 +1,16 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Copyright 2015 OpenStack Foundation |
|
| 4 | - * Licensed under the Apache License, Version 2.0 (the "License"); |
|
| 5 | - * you may not use this file except in compliance with the License. |
|
| 6 | - * You may obtain a copy of the License at |
|
| 7 | - * http://www.apache.org/licenses/LICENSE-2.0 |
|
| 8 | - * Unless required by applicable law or agreed to in writing, software |
|
| 9 | - * distributed under the License is distributed on an "AS IS" BASIS, |
|
| 10 | - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
| 11 | - * See the License for the specific language governing permissions and |
|
| 12 | - * limitations under the License. |
|
| 13 | - **/ |
|
| 3 | + * Copyright 2015 OpenStack Foundation |
|
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
|
| 5 | + * you may not use this file except in compliance with the License. |
|
| 6 | + * You may obtain a copy of the License at |
|
| 7 | + * http://www.apache.org/licenses/LICENSE-2.0 |
|
| 8 | + * Unless required by applicable law or agreed to in writing, software |
|
| 9 | + * distributed under the License is distributed on an "AS IS" BASIS, |
|
| 10 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
| 11 | + * See the License for the specific language governing permissions and |
|
| 12 | + * limitations under the License. |
|
| 13 | + **/ |
|
| 14 | 14 | |
| 15 | 15 | namespace jwk; |
| 16 | 16 | |
@@ -1,16 +1,16 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Copyright 2015 OpenStack Foundation |
|
| 4 | - * Licensed under the Apache License, Version 2.0 (the "License"); |
|
| 5 | - * you may not use this file except in compliance with the License. |
|
| 6 | - * You may obtain a copy of the License at |
|
| 7 | - * http://www.apache.org/licenses/LICENSE-2.0 |
|
| 8 | - * Unless required by applicable law or agreed to in writing, software |
|
| 9 | - * distributed under the License is distributed on an "AS IS" BASIS, |
|
| 10 | - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
| 11 | - * See the License for the specific language governing permissions and |
|
| 12 | - * limitations under the License. |
|
| 13 | - **/ |
|
| 3 | + * Copyright 2015 OpenStack Foundation |
|
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
|
| 5 | + * you may not use this file except in compliance with the License. |
|
| 6 | + * You may obtain a copy of the License at |
|
| 7 | + * http://www.apache.org/licenses/LICENSE-2.0 |
|
| 8 | + * Unless required by applicable law or agreed to in writing, software |
|
| 9 | + * distributed under the License is distributed on an "AS IS" BASIS, |
|
| 10 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
| 11 | + * See the License for the specific language governing permissions and |
|
| 12 | + * limitations under the License. |
|
| 13 | + **/ |
|
| 14 | 14 | |
| 15 | 15 | namespace jwk; |
| 16 | 16 | |
@@ -1,16 +1,16 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Copyright 2015 OpenStack Foundation |
|
| 4 | - * Licensed under the Apache License, Version 2.0 (the "License"); |
|
| 5 | - * you may not use this file except in compliance with the License. |
|
| 6 | - * You may obtain a copy of the License at |
|
| 7 | - * http://www.apache.org/licenses/LICENSE-2.0 |
|
| 8 | - * Unless required by applicable law or agreed to in writing, software |
|
| 9 | - * distributed under the License is distributed on an "AS IS" BASIS, |
|
| 10 | - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
| 11 | - * See the License for the specific language governing permissions and |
|
| 12 | - * limitations under the License. |
|
| 13 | - **/ |
|
| 3 | + * Copyright 2015 OpenStack Foundation |
|
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
|
| 5 | + * you may not use this file except in compliance with the License. |
|
| 6 | + * You may obtain a copy of the License at |
|
| 7 | + * http://www.apache.org/licenses/LICENSE-2.0 |
|
| 8 | + * Unless required by applicable law or agreed to in writing, software |
|
| 9 | + * distributed under the License is distributed on an "AS IS" BASIS, |
|
| 10 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
| 11 | + * See the License for the specific language governing permissions and |
|
| 12 | + * limitations under the License. |
|
| 13 | + **/ |
|
| 14 | 14 | |
| 15 | 15 | namespace jwk; |
| 16 | 16 | |
@@ -1,16 +1,16 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Copyright 2015 OpenStack Foundation |
|
| 4 | - * Licensed under the Apache License, Version 2.0 (the "License"); |
|
| 5 | - * you may not use this file except in compliance with the License. |
|
| 6 | - * You may obtain a copy of the License at |
|
| 7 | - * http://www.apache.org/licenses/LICENSE-2.0 |
|
| 8 | - * Unless required by applicable law or agreed to in writing, software |
|
| 9 | - * distributed under the License is distributed on an "AS IS" BASIS, |
|
| 10 | - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
| 11 | - * See the License for the specific language governing permissions and |
|
| 12 | - * limitations under the License. |
|
| 13 | - **/ |
|
| 3 | + * Copyright 2015 OpenStack Foundation |
|
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
|
| 5 | + * you may not use this file except in compliance with the License. |
|
| 6 | + * You may obtain a copy of the License at |
|
| 7 | + * http://www.apache.org/licenses/LICENSE-2.0 |
|
| 8 | + * Unless required by applicable law or agreed to in writing, software |
|
| 9 | + * distributed under the License is distributed on an "AS IS" BASIS, |
|
| 10 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
| 11 | + * See the License for the specific language governing permissions and |
|
| 12 | + * limitations under the License. |
|
| 13 | + **/ |
|
| 14 | 14 | |
| 15 | 15 | namespace jwk; |
| 16 | 16 | |
@@ -1,16 +1,16 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Copyright 2015 OpenStack Foundation |
|
| 4 | - * Licensed under the Apache License, Version 2.0 (the "License"); |
|
| 5 | - * you may not use this file except in compliance with the License. |
|
| 6 | - * You may obtain a copy of the License at |
|
| 7 | - * http://www.apache.org/licenses/LICENSE-2.0 |
|
| 8 | - * Unless required by applicable law or agreed to in writing, software |
|
| 9 | - * distributed under the License is distributed on an "AS IS" BASIS, |
|
| 10 | - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
| 11 | - * See the License for the specific language governing permissions and |
|
| 12 | - * limitations under the License. |
|
| 13 | - **/ |
|
| 3 | + * Copyright 2015 OpenStack Foundation |
|
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
|
| 5 | + * you may not use this file except in compliance with the License. |
|
| 6 | + * You may obtain a copy of the License at |
|
| 7 | + * http://www.apache.org/licenses/LICENSE-2.0 |
|
| 8 | + * Unless required by applicable law or agreed to in writing, software |
|
| 9 | + * distributed under the License is distributed on an "AS IS" BASIS, |
|
| 10 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
| 11 | + * See the License for the specific language governing permissions and |
|
| 12 | + * limitations under the License. |
|
| 13 | + **/ |
|
| 14 | 14 | |
| 15 | 15 | namespace jwk; |
| 16 | 16 | |