It is Base58 encoded with an initial version byte and 4 checksum bytes on the end. The version byte indicates the network (production network=128 and test network=239). The checksum is the first 4 bytes of the double SHA-256 hash of the version and key.
Here is some Java code which creates the private key from the dumped format:
public DumpedPrivateKey(String string) throws AddressFormatException {
//
// Decode the private key
//
byte[] decodedKey = Base58.decodeChecked(string);
int version = (int)decodedKey[0]&0xff;
if (version != Parameters.DUMPED_PRIVATE_KEY_VERSION)
throw new AddressFormatException(String.format("Version %d is not correct", version));
//
// The private key length is 33 for a compressed public key, otherwise it is 32
//
if (decodedKey.length == 33+1 && decodedKey[33] == (byte)1) {
isCompressed = true;
privKeyBytes = Arrays.copyOfRange(decodedKey, 1, decodedKey.length-1);
} else if (decodedKey.length == 32+1) {
isCompressed = false;
privKeyBytes = Arrays.copyOfRange(decodedKey, 1, decodedKey.length);
} else {
throw new AddressFormatException("Private key length is incorrect");
}
}
public static byte[] decodeChecked(String string) throws AddressFormatException {
//
// Decode the string
//
byte[] decoded = decode(string);
if (decoded.length < 4)
throw new AddressFormatException("Decoded string is too short");
//
// Verify the checksum contained in the last 4 bytes
//
byte[] bytes = Arrays.copyOfRange(decoded, 0, decoded.length-4);
byte[] checksum = Arrays.copyOfRange(decoded, decoded.length-4, decoded.length);
byte[] hash = Arrays.copyOfRange(Utils.doubleDigest(bytes), 0, 4);
if (!Arrays.equals(hash, checksum))
throw new AddressFormatException("Checksum is not correct");
//
// Return the result without the checksum bytes
//
return bytes;
}