/** * Basic constructor * * @param string the string to be carried in the VisibleString object, */ public DERVisibleString( String string) { this.string = Strings.toByteArray(string); }
/** * Basic constructor * * @param string the string to be carried in the UTF8String object, */ public DERUTF8String(String string) { this.string = Strings.toUTF8ByteArray(string); }
/** * return the object identifier signified by the passed in name. Null * if there is no object identifier associated with name. * * @return the object identifier associated with name, if present. */ public static ASN1ObjectIdentifier getOID( String name) { return (ASN1ObjectIdentifier)objIds.get(Strings.toUpperCase(name)); }
/** * return the object identifier signified by the passed in name. Null * if there is no object identifier associated with name. * * @return the object identifier associated with name, if present. */ public static ASN1ObjectIdentifier getOID( String name) { return (ASN1ObjectIdentifier)objIds.get(Strings.toLowerCase(name)); }
/** * Return a Java String representation of our contained String. * * @return a Java String representing our contents. */ public String getString() { return Strings.fromByteArray(string); }
@Test public void ensureJKUHeaderIsSetWhenBuildingAnAccessToken() { AuthorizationRequest authorizationRequest = constructAuthorizationRequest(clientId, GRANT_TYPE_CLIENT_CREDENTIALS, Strings.split(clientScopes, ',')); OAuth2Authentication authentication = new OAuth2Authentication(authorizationRequest.createOAuth2Request(), null); OAuth2AccessToken accessToken = tokenServices.createAccessToken(authentication); Jwt decode = JwtHelper.decode(accessToken.getValue()); assertThat(decode.getHeader().getJku(), startsWith(uaaUrl)); assertThat(decode.getHeader().getJku(), is("https://uaa.some.test.domain.com:555/uaa/token_keys")); }
/** * Convert an array of 8 bit characters into a string. * * @param bytes 8 bit characters. * @return resulting String. */ public static String fromByteArray(byte[] bytes) { return new String(asCharArray(bytes)); }
/** * return the object identifier signified by the passed in name. Null * if there is no object identifier associated with name. * * @return the object identifier associated with name, if present. */ public static ASN1ObjectIdentifier getOID( String name) { return (ASN1ObjectIdentifier)objIds.get(Strings.toLowerCase(name)); }
public String getString() { return Strings.fromByteArray(string); } }
private ColumnSize getComplexColumn(String path) { String[] segments = Strings.split(path, '.'); Map<String, ColumnSize> map = columnSizes; return getComplexColumnImpl(segments, 0, map); }
/** * Convert an array of 8 bit characters into a string. * * @param bytes 8 bit characters. * @return resulting String. */ public static String fromByteArray(byte[] bytes) { return new String(asCharArray(bytes)); }
/** * return the object identifier signified by the passed in name. Null * if there is no object identifier associated with name. * * @return the object identifier associated with name, if present. */ public static ASN1ObjectIdentifier getOID( String name) { return (ASN1ObjectIdentifier)objIds.get(Strings.toLowerCase(name)); }
/** * Basic constructor - with string 8 bit assumed. * * @param string the string to be wrapped. */ public DERT61String( String string) { this.string = Strings.toByteArray(string); }
/** * Basic constructor */ public DERUTF8String(String string) { this.string = Strings.toUTF8ByteArray(string); }
/** * return the object identifier signified by the passed in name. Null * if there is no object identifier associated with name. * * @return the object identifier associated with name, if present. */ public static ASN1ObjectIdentifier getOID( String name) { return (ASN1ObjectIdentifier)objIds.get(Strings.toUpperCase(name)); }
/** * Return the time. * * @return The time string as it appeared in the encoded object. */ public String getTimeString() { return Strings.fromByteArray(time); }
/** * return the object identifier signified by the passed in name. Null * if there is no object identifier associated with name. * * @return the object identifier associated with name, if present. */ public static ASN1ObjectIdentifier getOID( String name) { return (ASN1ObjectIdentifier)objIds.get(Strings.toLowerCase(name)); }
/** * Construct a GeneralString from the passed in String. * * @param string the string to be contained in this object. */ public DERGeneralString(String string) { this.string = Strings.toByteArray(string); }
/** * basic constructor - with string UTF8 conversion assumed. */ public DERT61UTF8String( String string) { this(Strings.toUTF8ByteArray(string)); }