Package org.apereo.cas.services
Class RegisteredServicePublicKeyCipherExecutor
- java.lang.Object
-
- org.apereo.cas.services.RegisteredServicePublicKeyCipherExecutor
-
- All Implemented Interfaces:
org.apereo.cas.services.RegisteredServiceCipherExecutor
public class RegisteredServicePublicKeyCipherExecutor extends java.lang.Object implements org.apereo.cas.services.RegisteredServiceCipherExecutor
Default cipher implementation based on public keys.- Since:
- 4.1
-
-
Constructor Summary
Constructors Constructor Description RegisteredServicePublicKeyCipherExecutor()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
decode(java.lang.String data, java.util.Optional<org.apereo.cas.services.RegisteredService> service)
java.lang.String
encode(java.lang.String data, java.util.Optional<org.apereo.cas.services.RegisteredService> service)
Encrypt using the given cipher associated with the service, and encode the data in base 64.protected static byte[]
encodeInternal(java.lang.String data, org.apereo.cas.services.RegisteredService registeredService)
Encode internally, meant to be called by extensions.
-
-
-
Method Detail
-
encode
public java.lang.String encode(java.lang.String data, java.util.Optional<org.apereo.cas.services.RegisteredService> service)
Encrypt using the given cipher associated with the service, and encode the data in base 64.- Specified by:
encode
in interfaceorg.apereo.cas.services.RegisteredServiceCipherExecutor
- Parameters:
data
- the dataservice
- the registered service- Returns:
- the encoded piece of data in base64
-
decode
public java.lang.String decode(java.lang.String data, java.util.Optional<org.apereo.cas.services.RegisteredService> service)
- Specified by:
decode
in interfaceorg.apereo.cas.services.RegisteredServiceCipherExecutor
-
encodeInternal
protected static byte[] encodeInternal(java.lang.String data, org.apereo.cas.services.RegisteredService registeredService)
Encode internally, meant to be called by extensions. Default behavior will encode the data based on the registered service public key's algorithm usingCipher
.- Parameters:
data
- the dataregisteredService
- the registered service- Returns:
- a byte[] that contains the encrypted result
-
-