jenkins.security
Class HexStringConfidentialKey

java.lang.Object
  extended by jenkins.security.ConfidentialKey
      extended by jenkins.security.HexStringConfidentialKey

public class HexStringConfidentialKey
extends ConfidentialKey

ConfidentialKey that is the random hexadecimal string of length N.

This is typically used as a unique ID, as a hex dump is suitable for printing, copy-pasting, as well as use as an identifier.

Since:
1.498
Author:
Kohsuke Kawaguchi

Constructor Summary
HexStringConfidentialKey(Class owner, String shortName, int length)
           
HexStringConfidentialKey(String id, int length)
           
 
Method Summary
 String get()
          Returns the persisted hex string value.
 
Methods inherited from class jenkins.security.ConfidentialKey
getId, load, store
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HexStringConfidentialKey

public HexStringConfidentialKey(String id,
                                int length)
Parameters:
length - Length of the hexadecimal string.

HexStringConfidentialKey

public HexStringConfidentialKey(Class owner,
                                String shortName,
                                int length)
Method Detail

get

public String get()
Returns the persisted hex string value. If the value isn't persisted, a new random value is created.

Throws:
Error - If the secret fails to load. Not throwing a checked exception is for the convenience of the caller.


Copyright © 2004-2013. All Rights Reserved.