Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for getFormat (0.2 sec)

  1. src/archive/tar/format.go

    func (b *block) toSparse() sparseArray { return sparseArray(b[:]) }
    
    // getFormat checks that the block is a valid tar header based on the checksum.
    // It then attempts to guess the specific format based on magic values.
    // If the checksum fails, then FormatUnknown is returned.
    func (b *block) getFormat() Format {
    	// Verify checksum.
    	var p parser
    	value := p.parseOctal(b.toV7().chksum())
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri Oct 13 18:36:46 GMT 2023
    - 11.3K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/hash/MacHashFunctionTest.java

                return "HmacMD5";
              }
    
              @Override
              public byte[] getEncoded() {
                return new byte[8];
              }
    
              @Override
              public String getFormat() {
                return "RAW";
              }
            };
        assertEquals(
            "ad262969c53bc16032f160081c4a07a0",
            Hashing.hmacMd5(customKey)
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 13.8K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/hash/MacHashFunctionTest.java

                return "HmacMD5";
              }
    
              @Override
              public byte[] getEncoded() {
                return new byte[8];
              }
    
              @Override
              public String getFormat() {
                return "RAW";
              }
            };
        assertEquals(
            "ad262969c53bc16032f160081c4a07a0",
            Hashing.hmacMd5(customKey)
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 13.8K bytes
    - Viewed (0)
  4. src/archive/tar/reader.go

    			return nil, nil, io.EOF // normal EOF; exactly 2 block of zeros read
    		}
    		return nil, nil, ErrHeader // Zero block and then non-zero block
    	}
    
    	// Verify the header matches a known format.
    	format := tr.blk.getFormat()
    	if format == FormatUnknown {
    		return nil, nil, ErrHeader
    	}
    
    	var p parser
    	hdr := new(Header)
    
    	// Unpack the V7 header.
    	v7 := tr.blk.toV7()
    	hdr.Typeflag = v7.typeFlag()[0]
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri Mar 08 01:59:14 GMT 2024
    - 26.8K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/hash/Hashing.java

      private static String hmacToString(String methodName, Key key) {
        return "Hashing."
            + methodName
            + "(Key[algorithm="
            + key.getAlgorithm()
            + ", format="
            + key.getFormat()
            + "])";
      }
    
      /**
       * Returns a hash function implementing the CRC32C checksum algorithm (32 hash bits) as described
       * by RFC 3720, Section 12.1.
       *
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 09 00:37:15 GMT 2024
    - 29.2K bytes
    - Viewed (0)
  6. src/archive/tar/writer_test.go

    		var blk block
    		copy(blk[:], b.Bytes())
    		prefix := string(blk.toUSTAR().prefix())
    		prefix, _, _ = strings.Cut(prefix, "\x00") // Truncate at the NUL terminator
    		if blk.getFormat() == FormatGNU && len(prefix) > 0 && strings.HasPrefix(name, prefix) {
    			t.Errorf("test %d, found prefix in GNU format: %s", i, prefix)
    		}
    
    		tr := NewReader(&b)
    		hdr, err := tr.Next()
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Tue Feb 27 16:39:23 GMT 2024
    - 38.7K bytes
    - Viewed (0)
  7. src/archive/tar/writer.go

    		namePrefix, hdr.Name = prefix, suffix
    	}
    
    	// Pack the main header.
    	var f formatter
    	blk := tw.templateV7Plus(hdr, f.formatString, f.formatOctal)
    	f.formatString(blk.toUSTAR().prefix(), namePrefix)
    	blk.setFormat(FormatUSTAR)
    	if f.err != nil {
    		return f.err // Should never happen since header is validated
    	}
    	return tw.writeRawHeader(blk, hdr.Size, hdr.Typeflag)
    }
    
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri Oct 13 18:36:46 GMT 2023
    - 19.6K bytes
    - Viewed (0)
  8. src/archive/tar/reader_test.go

    		// Write the initial GNU header.
    		var blk block
    		gnu := blk.toGNU()
    		sparse := gnu.sparse()
    		copy(gnu.realSize(), size)
    		sps = populateSparseMap(sparse, sps)
    		if format != FormatUnknown {
    			blk.setFormat(format)
    		}
    		out = append(out, blk[:]...)
    
    		// Write extended sparse blocks.
    		for len(sps) > 0 {
    			var blk block
    			sps = populateSparseMap(blk.toSparse(), sps)
    			out = append(out, blk[:]...)
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Mon Nov 21 21:14:38 GMT 2022
    - 47.1K bytes
    - Viewed (0)
Back to top