Message Security Layer (MSL)

com.netflix.msl.entityauth
Class RsaAuthenticationFactory

java.lang.Object
  extended by com.netflix.msl.entityauth.EntityAuthenticationFactory
      extended by com.netflix.msl.entityauth.RsaAuthenticationFactory

public class RsaAuthenticationFactory
extends EntityAuthenticationFactory

RSA asymmetric keys entity authentication factory.


Field Summary
(package private)  AuthenticationUtils authutils
          Authentication utilities.
private  RsaStore store
          RSA key store.
 
Constructor Summary
RsaAuthenticationFactory(RsaStore store, AuthenticationUtils authutils)
          Construct a new RSA asymmetric keys authentication factory instance.
 
Method Summary
 EntityAuthenticationData createData(MslContext ctx, JSONObject entityAuthJO)
          Construct a new entity authentication data instance from the provided JSON.
 ICryptoContext getCryptoContext(MslContext ctx, EntityAuthenticationData authdata)
          Create a crypto context that can be used to encrypt/decrypt and authenticate data from the entity.
 
Methods inherited from class com.netflix.msl.entityauth.EntityAuthenticationFactory
getScheme
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

store

private final RsaStore store
RSA key store.


authutils

final AuthenticationUtils authutils
Authentication utilities.

Constructor Detail

RsaAuthenticationFactory

public RsaAuthenticationFactory(RsaStore store,
                                AuthenticationUtils authutils)
Construct a new RSA asymmetric keys authentication factory instance.

Parameters:
store - RSA public key store.
authutils - authentication utilities.
Method Detail

createData

public EntityAuthenticationData createData(MslContext ctx,
                                           JSONObject entityAuthJO)
                                    throws MslEncodingException,
                                           MslCryptoException
Description copied from class: EntityAuthenticationFactory
Construct a new entity authentication data instance from the provided JSON.

Specified by:
createData in class EntityAuthenticationFactory
Parameters:
ctx - MSL context.
entityAuthJO - the JSON object.
Returns:
the entity authentication data.
Throws:
MslEncodingException - if there is an error parsing the JSON.
MslCryptoException - if there is an error with the entity authentication data cryptography.

getCryptoContext

public ICryptoContext getCryptoContext(MslContext ctx,
                                       EntityAuthenticationData authdata)
                                throws MslEntityAuthException
Description copied from class: EntityAuthenticationFactory
Create a crypto context that can be used to encrypt/decrypt and authenticate data from the entity. The implementation of this function must, by necessity, authenticate the entity authentication data.

Specified by:
getCryptoContext in class EntityAuthenticationFactory
Parameters:
ctx - MSL context.
authdata - the authentication data.
Returns:
the entity crypto context.
Throws:
MslEntityAuthException - if there is an error with the entity authentication data.

Message Security Layer (MSL)

Copyright © 2014 Netflix, Inc. All Rights Reserved.